<?php

class BolaoNews extends BaseBolaoNews
{
  public function getCreator()
  {
    return sfGuardUserPeer::retrieveByPK($this->getCreatorId());
  }
  
  public function canEdit($user)
  {
    if ($user->isSuperAdmin()) return true;
    if ($user->equals($this->getCreator())) return true;
    return false;
  }

  public function hasBolaoSubcategory()
  {
    return $this->subcategory_id > 0;
  }
}
